Integrand size = 28, antiderivative size = 410 \[ \int \frac {(d+e x)^2 \sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx=\frac {2 e (e f+7 d g) \sqrt {f+g x} \sqrt {a+c x^2}}{15 c g}+\frac {2 e (d+e x) \sqrt {f+g x} \sqrt {a+c x^2}}{5 c}+\frac {2 \sqrt {-a} \left (9 a e^2 g^2+c \left (2 e^2 f^2-10 d e f g-15 d^2 g^2\right )\right ) \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}} E\left (\arcsin \left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{15 c^{3/2} g^2 \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {a+c x^2}}-\frac {4 \sqrt {-a} e (e f-5 d g) \left (c f^2+a g^2\right ) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {1+\frac {c x^2}{a}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right ),-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{15 c^{3/2} g^2 \sqrt {f+g x} \sqrt {a+c x^2}} \]
[Out]
Time = 0.59 (sec) , antiderivative size = 410, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {956, 1668, 858, 733, 435, 430} \[ \int \frac {(d+e x)^2 \sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx=\frac {2 \sqrt {-a} \sqrt {\frac {c x^2}{a}+1} \sqrt {f+g x} \left (9 a e^2 g^2+c \left (-15 d^2 g^2-10 d e f g+2 e^2 f^2\right )\right ) E\left (\arcsin \left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{15 c^{3/2} g^2 \sqrt {a+c x^2} \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {-a} g+\sqrt {c} f}}}-\frac {4 \sqrt {-a} e \sqrt {\frac {c x^2}{a}+1} \left (a g^2+c f^2\right ) (e f-5 d g) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {-a} g+\sqrt {c} f}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right ),-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{15 c^{3/2} g^2 \sqrt {a+c x^2} \sqrt {f+g x}}+\frac {2 e \sqrt {a+c x^2} \sqrt {f+g x} (7 d g+e f)}{15 c g}+\frac {2 e \sqrt {a+c x^2} (d+e x) \sqrt {f+g x}}{5 c} \]
[In]
[Out]
Rule 430
Rule 435
Rule 733
Rule 858
Rule 956
Rule 1668
Rubi steps \begin{align*} \text {integral}& = \frac {2 e (d+e x) \sqrt {f+g x} \sqrt {a+c x^2}}{5 c}-\frac {\int \frac {-5 c d^2 f+a e (2 e f+d g)+\left (3 a e^2 g-c d (8 e f+5 d g)\right ) x-c e (e f+7 d g) x^2}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{5 c} \\ & = \frac {2 e (e f+7 d g) \sqrt {f+g x} \sqrt {a+c x^2}}{15 c g}+\frac {2 e (d+e x) \sqrt {f+g x} \sqrt {a+c x^2}}{5 c}-\frac {2 \int \frac {-\frac {1}{2} c g^2 \left (15 c d^2 f-a e (7 e f+10 d g)\right )+\frac {1}{2} c g \left (9 a e^2 g^2+c \left (2 e^2 f^2-10 d e f g-15 d^2 g^2\right )\right ) x}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{15 c^2 g^2} \\ & = \frac {2 e (e f+7 d g) \sqrt {f+g x} \sqrt {a+c x^2}}{15 c g}+\frac {2 e (d+e x) \sqrt {f+g x} \sqrt {a+c x^2}}{5 c}-\frac {1}{15} \left (-15 d^2+e^2 \left (\frac {9 a}{c}+\frac {2 f^2}{g^2}\right )-\frac {10 d e f}{g}\right ) \int \frac {\sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx+\frac {\left (2 e (e f-5 d g) \left (c f^2+a g^2\right )\right ) \int \frac {1}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{15 c g^2} \\ & = \frac {2 e (e f+7 d g) \sqrt {f+g x} \sqrt {a+c x^2}}{15 c g}+\frac {2 e (d+e x) \sqrt {f+g x} \sqrt {a+c x^2}}{5 c}-\frac {\left (2 a \left (-15 d^2+e^2 \left (\frac {9 a}{c}+\frac {2 f^2}{g^2}\right )-\frac {10 d e f}{g}\right ) \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}}\right ) \text {Subst}\left (\int \frac {\sqrt {1+\frac {2 a \sqrt {c} g x^2}{\sqrt {-a} \left (c f-\frac {a \sqrt {c} g}{\sqrt {-a}}\right )}}}{\sqrt {1-x^2}} \, dx,x,\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )}{15 \sqrt {-a} \sqrt {c} \sqrt {\frac {c (f+g x)}{c f-\frac {a \sqrt {c} g}{\sqrt {-a}}}} \sqrt {a+c x^2}}+\frac {\left (4 a e (e f-5 d g) \left (c f^2+a g^2\right ) \sqrt {\frac {c (f+g x)}{c f-\frac {a \sqrt {c} g}{\sqrt {-a}}}} \sqrt {1+\frac {c x^2}{a}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {1+\frac {2 a \sqrt {c} g x^2}{\sqrt {-a} \left (c f-\frac {a \sqrt {c} g}{\sqrt {-a}}\right )}}} \, dx,x,\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )}{15 \sqrt {-a} c^{3/2} g^2 \sqrt {f+g x} \sqrt {a+c x^2}} \\ & = \frac {2 e (e f+7 d g) \sqrt {f+g x} \sqrt {a+c x^2}}{15 c g}+\frac {2 e (d+e x) \sqrt {f+g x} \sqrt {a+c x^2}}{5 c}-\frac {2 \sqrt {-a} \left (15 d^2-e^2 \left (\frac {9 a}{c}+\frac {2 f^2}{g^2}\right )+\frac {10 d e f}{g}\right ) \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}} E\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{15 \sqrt {c} \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {a+c x^2}}-\frac {4 \sqrt {-a} e (e f-5 d g) \left (c f^2+a g^2\right ) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {1+\frac {c x^2}{a}} F\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{15 c^{3/2} g^2 \sqrt {f+g x} \sqrt {a+c x^2}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 25.09 (sec) , antiderivative size = 591, normalized size of antiderivative = 1.44 \[ \int \frac {(d+e x)^2 \sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx=\frac {\sqrt {f+g x} \left (\frac {2 e \left (a+c x^2\right ) (10 d g+e (f+3 g x))}{c g}+\frac {(f+g x) \left (\frac {2 g^2 \sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}} \left (-9 a e^2 g^2+c \left (-2 e^2 f^2+10 d e f g+15 d^2 g^2\right )\right ) \left (a+c x^2\right )}{(f+g x)^2}+\frac {2 \sqrt {c} \left (-i \sqrt {c} f+\sqrt {a} g\right ) \left (-9 a e^2 g^2+c \left (-2 e^2 f^2+10 d e f g+15 d^2 g^2\right )\right ) \sqrt {\frac {g \left (\frac {i \sqrt {a}}{\sqrt {c}}+x\right )}{f+g x}} \sqrt {-\frac {\frac {i \sqrt {a} g}{\sqrt {c}}-g x}{f+g x}} E\left (i \text {arcsinh}\left (\frac {\sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}{\sqrt {f+g x}}\right )|\frac {\sqrt {c} f-i \sqrt {a} g}{\sqrt {c} f+i \sqrt {a} g}\right )}{\sqrt {f+g x}}+\frac {2 \sqrt {c} g \left (\sqrt {c} f+i \sqrt {a} g\right ) \left (15 i c d^2 g-9 i a e^2 g+2 \sqrt {a} \sqrt {c} e (e f-5 d g)\right ) \sqrt {\frac {g \left (\frac {i \sqrt {a}}{\sqrt {c}}+x\right )}{f+g x}} \sqrt {-\frac {\frac {i \sqrt {a} g}{\sqrt {c}}-g x}{f+g x}} \operatorname {EllipticF}\left (i \text {arcsinh}\left (\frac {\sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}{\sqrt {f+g x}}\right ),\frac {\sqrt {c} f-i \sqrt {a} g}{\sqrt {c} f+i \sqrt {a} g}\right )}{\sqrt {f+g x}}\right )}{c^2 g^3 \sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}\right )}{15 \sqrt {a+c x^2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(699\) vs. \(2(338)=676\).
Time = 2.09 (sec) , antiderivative size = 700, normalized size of antiderivative = 1.71
method | result | size |
elliptic | \(\frac {\sqrt {\left (g x +f \right ) \left (c \,x^{2}+a \right )}\, \left (\frac {2 e^{2} x \sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}{5 c}+\frac {2 \left (2 d e g +\frac {1}{5} e^{2} f \right ) \sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}{3 c g}+\frac {2 \left (d^{2} f -\frac {2 e^{2} f a}{5 c}-\frac {\left (2 d e g +\frac {1}{5} e^{2} f \right ) a}{3 c}\right ) \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, F\left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{\sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}+\frac {2 \left (d^{2} g +2 d e f -\frac {3 e^{2} a g}{5 c}-\frac {2 \left (2 d e g +\frac {1}{5} e^{2} f \right ) f}{3 g}\right ) \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \left (\left (-\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) E\left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )+\frac {\sqrt {-a c}\, F\left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{c}\right )}{\sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}\right )}{\sqrt {g x +f}\, \sqrt {c \,x^{2}+a}}\) | \(700\) |
risch | \(\text {Expression too large to display}\) | \(1073\) |
default | \(\text {Expression too large to display}\) | \(2470\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.10 (sec) , antiderivative size = 300, normalized size of antiderivative = 0.73 \[ \int \frac {(d+e x)^2 \sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx=\frac {2 \, {\left (2 \, {\left (c e^{2} f^{3} - 5 \, c d e f^{2} g - 15 \, a d e g^{3} + 3 \, {\left (5 \, c d^{2} - 2 \, a e^{2}\right )} f g^{2}\right )} \sqrt {c g} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, \frac {3 \, g x + f}{3 \, g}\right ) + 3 \, {\left (2 \, c e^{2} f^{2} g - 10 \, c d e f g^{2} - 3 \, {\left (5 \, c d^{2} - 3 \, a e^{2}\right )} g^{3}\right )} \sqrt {c g} {\rm weierstrassZeta}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, \frac {3 \, g x + f}{3 \, g}\right )\right ) + 3 \, {\left (3 \, c e^{2} g^{3} x + c e^{2} f g^{2} + 10 \, c d e g^{3}\right )} \sqrt {c x^{2} + a} \sqrt {g x + f}\right )}}{45 \, c^{2} g^{3}} \]
[In]
[Out]
\[ \int \frac {(d+e x)^2 \sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx=\int \frac {\left (d + e x\right )^{2} \sqrt {f + g x}}{\sqrt {a + c x^{2}}}\, dx \]
[In]
[Out]
\[ \int \frac {(d+e x)^2 \sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx=\int { \frac {{\left (e x + d\right )}^{2} \sqrt {g x + f}}{\sqrt {c x^{2} + a}} \,d x } \]
[In]
[Out]
\[ \int \frac {(d+e x)^2 \sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx=\int { \frac {{\left (e x + d\right )}^{2} \sqrt {g x + f}}{\sqrt {c x^{2} + a}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(d+e x)^2 \sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx=\int \frac {\sqrt {f+g\,x}\,{\left (d+e\,x\right )}^2}{\sqrt {c\,x^2+a}} \,d x \]
[In]
[Out]